package org.shoukaiseki.supersaiyan.db.inittable.system;

import org.shoukaiseki.inittable.domain.TableColumnInfo;
import org.shoukaiseki.inittable.domain.TableIndexInfo;
import org.shoukaiseki.inittable.service.ITableBuildInfoService;
import org.shoukaiseki.kakaroto.annotation.TableBuild;

import java.util.List;

import static org.shoukaiseki.inittable.utils.SksColumnCamelCaseCommon.uniqueId;
import static org.shoukaiseki.inittable.utils.TableColumnInfoBuilder.column;
import static org.shoukaiseki.inittable.utils.TableIndexInfoBuilder.uniqueIndex;
import static org.shoukaiseki.inittable.utils.TableInfoUtils.tableColumns;
import static org.shoukaiseki.inittable.utils.TableInfoUtils.tableIndexs;

/**
 *
 **/
@TableBuild(name = "sys_notice", comment = "公告",version = 1)
public class SysNoticeInitTableInfo implements ITableBuildInfoService {


    @Override
    public List<TableColumnInfo> tableColumnInfoList(){
        List<TableColumnInfo> table = tableColumns(
                uniqueId("notice_id","公告ID"),
                column("	notice_id      int auto_increment comment '公告ID'"),
                column("		primary key,"),
                column("	notice_title   varchar(50)             not null comment '公告标题',"),
                column("	notice_type    char                    not null comment '公告类型（1通知 2公告）',"),
                column("	notice_content longblob                null comment '公告内容',"),
                column("	status         char        default '0' null comment '公告状态（0正常 1关闭）',"),
                column("	create_by      varchar(64) default ''  null comment '创建者',"),
                column("	create_time    datetime                null comment '创建时间',"),
                column("	update_by      varchar(64) default ''  null comment '更新者',"),
                column("	update_time    datetime                null comment '更新时间',"),
                column("	remark         varchar(255)            null comment '备注'"),
                null
        );

        return table;
    }

}
